package com.iflytek.universitymanagement.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iflytek.universitymanagement.domain.Teacher;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author louyp
 * @since 2024-11-26
 */
public interface TeacherMapper extends BaseMapper<Teacher> {
    @Select("SELECT * FROM teacher WHERE name = #{name}")
    Teacher selectByTeacherName(String name);

    @Insert("insert into `teacher` ( name, password,gender,subject,contact,avatar, email,role) " +
            "values (#{name}, #{password}, #{gender}, #{subject},  #{contact}, #{avatar}, #{email}, #{role})")
    void insertTeacher(Teacher teacher);
}
